package com.zhanghs.contentcenter.controller;

import com.zhanghs.contentcenter.entity.TbIndustry;
import com.zhanghs.contentcenter.service.TbIndustryService;
import com.zhanghs.contentcenter.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zhanghongshan
 * @date 2021/9/25 3:52 下午
 */
@RestController
@RequestMapping("/api/test")
public class TestController {
    @Autowired
    private TestService testService;
    @Autowired
    private TbIndustryService tbIndustryService;

    @GetMapping("/test-a/{id}")
    @ResponseBody
    public TbIndustry testA(@PathVariable("id") Integer id){
        return tbIndustryService.getById(id);

    }

    @GetMapping("/test-b")
    public String testB(){
        testService.common();
        return "test-b";
    }
}
